{%  extends 'Shop/shopbase.html' %}

{% load i18n tag_ext %}

{% block main %}
    {% with product=viewmodel.current %}
        <div class="col-main">
            <div id="messages_product_view"></div>
            <div class="product-view">
                <div class="product-essential">
                    <form action="/cart/configure/{{ product.id }}/" method="post" id="product_addtocart_form">
                        {% csrf_token %}
                        <div class="no-display">
                            <input type="hidden" name="product" value="{{ product.id }}">
                            <input type="hidden" name="related_product" id="related-products-field" value="">
                        </div>

                        <div class="product-shop">
                            <div class="product-name">
                                <h1>{{ product.name }}</h1>
                            </div>

                            <p class="email-friend"><a href="http://www.emthemes.com/demo/magento-theme-perfume-store-em0008/index.php/sendfriend/product/send/id/167/">Email to a Friend</a></p>

                            <p class="no-rating"><a href="http://www.emthemes.com/demo/magento-theme-perfume-store-em0008/index.php/review/product/list/id/167/#review-form">Be the first to review this product</a></p>

                            <p class="availability in-stock">Availability: <span>In stock</span></p>



                            <div class="price-box">
                                                                <span class="regular-price" id="product-price-{{ product.id }}">
                        <span class="price">${{ product.price }}</span>                </span>

                            </div>



                            <div class="add-to-box">

                                <div class="add-to-cart">
                                    <label for="id_quantity">Qty:</label>
                                    <input type="text" name="quantity" id="id_quantity" maxlength="12" value="{% get_quantity product.id %}" title="Qty" class="input-text qty"/>
                                    <button type="button" title="Update Cart" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span>Update Cart</span></span></button>
                                </div>
                                <span class="or">OR</span>


                                <ul class="add-to-links">
                                    <li><a href="http://www.emthemes.com/demo/magento-theme-perfume-store-em0008/index.php/wishlist/index/add/product/167/" onclick="productAddToCartForm.submitLight(this, 'http://www.emthemes.com/demo/magento-theme-perfume-store-em0008/index.php/wishlist/index/add/product/167/'); return false;" class="link-wishlist">Add to Wishlist</a></li>
                                    <li><span class="separator">|</span> <a href="http://www.emthemes.com/demo/magento-theme-perfume-store-em0008/index.php/catalog/product_compare/add/product/167/uenc/aHR0cDovL3d3dy5lbXRoZW1lcy5jb20vZGVtby9tYWdlbnRvLXRoZW1lLXBlcmZ1bWUtc3RvcmUtZW0wMDA4L2luZGV4LnBocC9jaGVja291dC9jYXJ0L2NvbmZpZ3VyZS9pZC8zMTQyLw,,/" class="link-compare">Add to Compare</a></li>
                                </ul>
                            </div>

                            <div class="short-description">
                                <h2><span>Quick Overview</span></h2>
                                <div class="std"><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.﻿</p></div>
                            </div>



                        </div>

                        <div class="product-img-box">
                            <p class="product-image product-image-zoom">
                                <img id="image" src="http://www.emthemes.com/demo/magento-theme-perfume-store-em0008/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/l/a/large-image_2.jpg" alt="Aqua Allegoria" title="Aqua Allegoria" style="width: 265px; left: 0px; top: 0px; " nosudispl="1"><div style="display: block; width: 20px; height: 75px"></div></p>
                            <p class="zoom-notice" id="track_hint">Double click on above image to view full picture</p>
                            <div class="zoom">
                                <img id="zoom_out" src="http://www.emthemes.com/demo/magento-theme-perfume-store-em0008/skin/frontend/em0008/default/images/slider_btn_zoom_out.gif" alt="Zoom Out" title="Zoom Out" class="btn-zoom-out">
                                <div id="track">
                                    <div id="handle" class="selected" style="left: 0px; "></div>
                                </div>
                                <img id="zoom_in" src="http://www.emthemes.com/demo/magento-theme-perfume-store-em0008/skin/frontend/em0008/default/images/slider_btn_zoom_in.gif" alt="Zoom In" title="Zoom In" class="btn-zoom-in">
                            </div>
                            <script type="text/javascript">
                                //<![CDATA[
                                Event.observe(window, 'load', function() {
                                    product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint');
                                });
                                //]]>
                            </script>
                            <div class="more-views">
                                <h2>More Views</h2>
                                <ul>
                                    <li>
                                        <a href="#" onclick="popWin('http://www.emthemes.com/demo/magento-theme-perfume-store-em0008/index.php/checkout/cart/gallery/id/167/image/371/', 'gallery', 'width=300,height=300,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;" title=""><img src="http://www.emthemes.com/demo/magento-theme-perfume-store-em0008/media/catalog/product/cache/1/thumbnail/56x/9df78eab33525d08d6e5fb8d27136e95/l/a/large-image_2.jpg" width="56" height="56" alt=""></a>
                                    </li>
                                </ul>
                            </div>
                        </div>

                        <div class="clearer"></div>
                    </form>
                    <script type="text/javascript">
                        //<![CDATA[
                        var productAddToCartForm = new VarienForm('product_addtocart_form');
                        productAddToCartForm.submit = function(button, url) {
                            if (this.validator.validate()) {
                                var form = this.form;
                                var oldUrl = form.action;

                                if (url) {
                                    form.action = url;
                                }
                                var e = null;
                                try {
                                    this.form.submit();
                                } catch (e) {
                                }
                                this.form.action = oldUrl;
                                if (e) {
                                    throw e;
                                }

                                if (button && button != 'undefined') {
                                    button.disabled = true;
                                }
                            }
                        }.bind(productAddToCartForm);

                        productAddToCartForm.submitLight = function(button, url){
                            if(this.validator) {
                                var nv = Validation.methods;
                                delete Validation.methods['required-entry'];
                                delete Validation.methods['validate-one-required'];
                                delete Validation.methods['validate-one-required-by-name'];
                                if (this.validator.validate()) {
                                    if (url) {
                                        this.form.action = url;
                                    }
                                    this.form.submit();
                                }
                                Object.extend(Validation.methods, nv);
                            }
                        }.bind(productAddToCartForm);
                        //]]>
                    </script>
                </div>

                <div class="product-collateral">
                    <div class="box-collateral box-description">
                        <h2><span>Details</span></h2>
                        <div class="std">
                            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
                            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
                            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>    </div>
                    </div>
                    <div class="box-collateral box-tags">
                        <h2><span>Product Tags</span></h2>
                        <form id="addTagForm" action="http://www.emthemes.com/demo/magento-theme-perfume-store-em0008/index.php/tag/index/save/product/167/uenc/aHR0cDovL3d3dy5lbXRoZW1lcy5jb20vZGVtby9tYWdlbnRvLXRoZW1lLXBlcmZ1bWUtc3RvcmUtZW0wMDA4L2luZGV4LnBocC9jaGVja291dC9jYXJ0L2NvbmZpZ3VyZS9pZC8zMTQyLw,,/" method="get">
                            <div class="form-add">
                                <label for="productTagName">Add Your Tags:</label>
                                <div class="input-box">
                                    <input type="text" class="input-text required-entry" name="productTagName" id="productTagName">
                                </div>
                                <button type="button" title="Add Tags" class="button" onclick="submitTagForm()">
                    <span>
                        <span>Add Tags</span>
                    </span>
                                </button>
                            </div>
                        </form>
                        <p class="note">Use spaces to separate tags. Use single quotes (') for phrases.</p>
                        <script type="text/javascript">
                            //<![CDATA[
                            var addTagFormJs = new VarienForm('addTagForm');
                            function submitTagForm(){
                                if(addTagFormJs.validator.validate()) {
                                    addTagFormJs.form.submit();
                                }
                            }
                            //]]>
                        </script>
                    </div>
                </div>
            </div>

            <script type="text/javascript">
                Mage.Cookies.set('external_no_cache', 1);
            </script>
        </div>
    {% endwith %}
{% endblock %}
